<?php

namespace app\backend\model;

use think\Model;

class AdminUser extends Model
{
   // protected $pk = 'id';

    public function setPasswordAttr($value, $data)
    {
        return md5($value);
    }
    
    public function roles()
    {
        return $this->belongsTo('AdminRole', 'role_id', 'id');
    }
}
